package com.chenshu.mybatis_demo.mapper;

import com.chenshu.mybatis_demo.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-04-14
 * Time：22:40
 */
@Mapper
public interface UserMapper {
    public List<UserInfo> getAll();

    public UserInfo getUserById(@Param("uid") Integer id);

    public List<UserInfo> getUserByUsername(@Param("username") String username);

    public UserInfo userLogin(@Param("username") String username, @Param("password") String password);

    public int add(UserInfo userInfo);

    public void updateUserInfo(UserInfo userInfo);
}
